package 第三章作业.第二次;

import java.util.Scanner;
public class Test8 {
    public static void main(String[] args) {
        Scanner reader = new Scanner(System.in);
        System.out.println("请输入第1个数字");
        int a = reader.nextInt();
        System.out.println("请输入第2个数字");
        int b = reader.nextInt();
        System.out.println("请输入第3个数字");
        int c = reader.nextInt();

        if (a < b) {
            if (b < c && b > a){
                System.out.println(a + " " + b + " " + c);
            }else if (a < c && c < b) {
                System.out.println(a + " " + c + " " + b);
            }else if (c < a && a < b) {
                System.out.println(c + " " + a + " " + b);
            }
        }else {
            if (b < a && a < c){
                System.out.println(b + " " + a + " " + c);
            }else if (b < c && c < a) {
                System.out.println(b + " " + c + " " + a);
            }else if (c < b && b < a) {
                System.out.println(c + " " + b + " " + a);
            }
        }
    }
}
